<template>
	<section class="banner-detail">
		<main>
			<mt-header fixed :title="data.title">
				<router-link to="/" slot="left">
					<mt-button icon="back">
                        <span class="fontc2">首页</span>
                    </mt-button>
				</router-link>
			</mt-header>
			<div class="mt40 ml10 mr10">
				<div v-html="data.content"></div>
			</div>
		</main>
	</section>
</template>
<script>

import {MessageBox,Toast,Indicator} from 'mint-ui'
import axios      from 'axios'

export default{
	name: "BannerDetail",
	data () {
		return {
			data: {},
		}
	},
	created () {
		//this.$route.query.id 为 router 传递过来的参数
		this.getBannerDetail(this.$route.query.id);
	},
	methods : {
		getBannerDetail (id) {
			Indicator.open('加载资讯详情');
			axios.get('/user/news/findNews.do?id=' + id)
			.then(res => {
				Indicator.close();
				res = res.data;
				console.log(res);
				if (res.code == 200) {
					this.data = res.data;
				} else {
					MessageBox("查询详情",res.msg);
				}
			})
			
		}
	},
};

</script>
<style scoped>
    p,p span {
        color: #333 !important;
    }
</style>